<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:th="http://www.thymeleaf.org"
	xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
	layout:decorator="main">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>群组显示</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script language="javascript">
	$(function() {
		//导航切换
		$(".imglist li").click(function() {
			$(".imglist li.selected").removeClass("selected")
			$(this).addClass("selected");
		})
	})
</script>
<script type="text/javascript">
	$(document).ready(function() {
		$("#addStudent").click(function() {
			window.location.href = "/addStudentHTML";
		});
	});
</script>
</head>


<body layout:fragment="content">

	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a href="/ordering/home">首页</a></li>
			<li><a href="#">群组信息</a></li>
		</ul>
	</div>

	<div class="rightinfo">
		<br />
		<div class="tools">
			<form action="getGroup">
				<div class="container">
					<div class="col align-self-center">
						<div class="input-group input-group-lg">
							<div class="input-group-prepend">
								<span class="input-group-text" id="inputGroup-sizing-lg">学校</span>
							</div>
							<input type="text" name="schoolName" th:value="${schoolName}"
								placeholder="请输入学校" class="form-control" aria-label="Large"
								aria-describedby="inputGroup-sizing-sm" />
							<button type="submit" class="btn btn-primary">搜索</button>
						</div>
					</div>
				</div>
			</form>
		</div>
		<br />
		<table class="table table-hover">
			<thead>
				<tr>
					<td>序号</td>
					<td>ID</td>
					<td>所属学校</td>
					<td>名称</td>
					<td>描述</td>
					<td>群主</td>
					<td>年级</td>
					<td>班级</td>
					<td>创建时间</td>
					<td>操作</td>
				</tr>
			</thead>

			<tbody th:object="${groupPageBean}">
				<tr th:each="group :*{list}">
					<td th:text="${groupStat.count}">ID</td>
					<td th:text="${group.id}">ID</td>
					<td th:text="${group.teacher.school.name}">所属学校</td>
					<td th:text="${group.name}">名称</td>
					<td th:text="${group.description}">描述</td>
					<td th:text="${group.teacher.name}">群主</td>
					<td th:text="${group.grade.name}">年级</td>
					<td th:text="${group.clazz.name}">班级</td>
					<td th:text="${group.createTime}">创建时间</td>
					<td><a href="#"
						th:href="@{/groupDetailHTML(groupId=${group.id})}">查看</a></td>
				</tr>
			</tbody>
		</table>
		<div th:include="page :: GroupPager" th:remove="tag"></div>
	</div>

	<script type="text/javascript">
		$('.imgtable tbody tr:odd').addClass('odd');
	</script>
	<!-- 	<script type="text/javascript">
	$(document).ready(function() {
		var img  =  $("#imgId")[0].src; 
		var a  = img.substr(""");
		alert(a);
		/* $("#imgId").attr('src','data:image/png;base64,'+img); */ 
	});
</script> -->
</body>
</html>
